simpleAVC ReadMe
04/04/02

simpleAVC - sample code showing how to find and talk to an AVC device.

AVC devices (i.e. camcorders, etc.) are represented in the IORegistry as instances of IOFireWireAVCUnit.
This sample assumes that the AVC device connected is a tape recorder/player with a tape in the transport.
For example a camcorder in VCR mode.

The sample code does the following:

- Find all IOFireWireAVCUnits in the IORegistry ( IOServiceGetMatchingServices ).

- Open the userclient for the first AVC device ( kIOFireWireAVCLibUnitTypeID ) and get the IUnknown interface.

- Query the IUnknown interface for the AVC device interface ( kIOFireWireAVCLibUnitInterfaceID ).

- Using the AVC device interface:
	 Send the UNIT INFO command to the AVC device and display the results.
	Send the SUBUNIT INFO command and display the info for the first 4 subunits.
	 Send the PLAY (FORWARD) command to the first VCR subunit and display the response from the subunit.
		If the command is accepted, wait for 10 seconds while the tape plays.
	 Send the WIND (STOP) command to stop the transport.

To run the sample:
     The sample depends on headers in the FireWire SDK 12a (IOFireWireAVCLib.h & IOFireWireAVCConsts.h).
      You will need these files to build the sample.
     Build the sample
     Attach a DV camcorder, switch it into VCR mode, and put a tape in the transport.
     Open Terminal. Navigate to the /simpleAVC/build folder.
     Run the sample in Terminal by typing ./simpleAVC
     Admire the lovely user interface ;-)
	
IMPORTANT: Things this sample DOES NOT DO:

- This code is NOT ready to cut-and-paste into your product and ship.
- This code is NOT robust: there is a bare minimum of error checking in some places, elsewhere there is NONE.
- This code shows one possible way of performing a task: it is NOT the only way, nor even the best possible way.

Apple DTS
April 4, 2002